package com.maserb.monitor.repository;

import com.maserb.monitor.entity.JwEducationInfoEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface JwEducationInfoRepository  extends JpaSpecificationExecutor<JwEducationInfoEntity>
        , PagingAndSortingRepository<JwEducationInfoEntity, String> {

        List<JwEducationInfoEntity> findByTitle(String title);

        @Query(value = "select max(favorites) from JwEducationInfoEntity ")
        Integer find();
}